To reduce the number of casualties due to traffic accidents, the development of a preventive safety system that prevents accidents is underway. The preventive safety system is a system that operates under a situation in which accidents are highly likely to occur. For example, a pre-crash safety system or the like is put to practical use that calls the attention of a driver with an alarm when a collision with an obstacle in front of the driver's own vehicle is likely to occur and reduces damage to passengers with an automatic brake when a situation in which a collision is unavoidable occurs.
In the system, as a method of detecting obstacles such as a vehicle or a pedestrian, there is a method of picking up an image of the front of the own vehicle with a camera and detecting an obstacle from the picked-up image. In this case, in order to make the detection less easily affected by colors of the obstacle and the background, the system uses a method of calculating an amount of change in a gray value from the picked-up image, generating an edge image obtained by extracting only portions where the amount of change is equal to or larger than a predetermined threshold, and calculating a degree of similarity between a contour of the obstacle on the edge image and templates of contours of obstacles stored in advance to thereby detect the obstacle.
For example, Patent Document 1 describes a method of detecting an object in front of an own vehicle with a laser radar, improving a contrast of a gray value of an image region including the object detected by the laser radar, and extracting an edge. With this method, even when an obstacle is present in a dark place such as the inside of a tunnel or the shade and a change in a gray value between the obstacle and the background is small, since a contrast of an image region including the object is improved, the change in the gray value increases and an edge can be extracted.
Patent Document 1: JP Patent Publication (Kokai) No. 2007-96510